const { createProxyMiddleware } = require("http-proxy-middleware");

console.log(process.env);

module.exports = function (app) {
  app.use(
    createProxyMiddleware("/api", {
      target: "http://www.aaaa.com", // 请求的地址
      changeOrigin: true,
      pathRewrite: {
        "^/api": "",
      },
    })
  );
};
